package a.j;

import a.c.z;
import a.d.o;
import a.d.t;
import a.f.cc;
import a.f.yc;

import java.awt.*;
import java.awt.geom.Rectangle2D;
import java.util.Iterator;
import java.util.List;

public class y
  extends w
{
  private yc m;
  private ld o;
  private jg p;
  private boolean q;
  private o r;
  private double s;
  private double t;
  public static boolean u;
  
  public y()
  {
    this(null);
  }
  
  public y(pg parampg)
  {
    super(parampg);
    c(30.0D);
    b(5.0D);
    this.q = false;
  }
  
  public void g()
  {
    super.g();
    n();
  }
  
  private void n()
  {
    this.p = null;
    this.o = null;
    this.m = null;
    this.q = false;
    this.r = null;
  }
  
  public void a(a.d.w paramw, ig paramig)
  {
    n();
    a(paramw);
    a(r());
    h();
    this.r = paramig.d();
    this.q = true;
  }
  
  public void a(a.d.w paramw, jg paramjg)
  {
    n();
    a(paramw);
    a(q());
    h();
    this.p = paramjg;
    this.o = paramjg.hb();
    this.r = paramjg.d();
    this.m = paramjg.a();
    this.q = true;
  }
  
  public a.d.w b(a.d.w paramw)
  {
    boolean bool = ld.E;
    z localz = new z();
    yc localyc = this.m;
    double d;
    if (!bool) {
      if ((localyc instanceof se))
      {
        d = ((se)localyc).b();
        if (bool) {
          break label83;
        }
        a(d, paramw, localz);
      }
    }
    if ((ld.D) && ((localyc instanceof cc)))
    {
      d = this.p.cb();
      a(d, paramw, localz);
    }
    label83:
    return b(localz, paramw);
  }
  
  public a.d.w b(List paramList, a.d.w paramw)
  {
    i();
    if (!ld.E) {
      if (!this.q) {
        return paramw;
      }
    }
    return a(paramList, paramw);
  }
  
  private void a(double paramDouble, a.d.w paramw, List paramList)
  {
    boolean bool = ld.E;
    o localo1 = this.r;
    o localo2 = new o(localo1.a());
    localo2.b(localo2.g() + 2.0D * paramDouble, localo2.h() + 2.0D * paramDouble);
    localo2.b(paramw);
    List localList1 = o();
    if (!bool) {
      if (localList1 != null)
      {
        if (bool) {
          break label127;
        }
        if (!localList1.isEmpty()) {
          a(paramw, new a.d.w(localo2.g() * 0.5D, localo2.h() * 0.5D), localList1, paramList);
        }
      }
    }
    label127:
    List localList2 = p();
    if (((bool) || (localList2 != null)) && (!localList2.isEmpty())) {
      a(paramw, new a.d.w(localo1.g() * 0.5D, localo1.h() * 0.5D), localList2, paramList);
    }
    z localz = new z();
    t localt = this.p.c();
    double d1 = localt.d() + localt.b() * 0.5D;
    double d2 = localt.e() + localt.c() * 0.5D;
    a.d.w localw = localo1.l();
    localz.add(new a_((byte)1, localw, Math.min(localw.b(), d2), Math.max(localw.b(), d2)));
    localz.add(new a_((byte)0, localw, Math.min(localw.a(), d1), Math.max(localw.a(), d1)));
    a(paramw, new a.d.w(localo1.g() * 0.5D, localo1.h() * 0.5D), localz, paramList);
  }
  
  private void a(a.d.w paramw1, a.d.w paramw2, List paramList1, List paramList2)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    double d1 = f() / d().M();
    Iterator localIterator = paramList1.iterator();
    label169:
    label327:
    label329:
    label348:
    label510:
    do
    {
      do
      {
        ue localue;
        double d3;
        double d5;
        do
        {
          double d2;
          double d4;
          do
          {
            do
            {
              do
              {
                do
                {
                  do
                  {
                    do
                    {
                      do
                      {
                        do
                        {
                          do
                          {
                            do
                            {
                              do
                              {
                                do
                                {
                                  if (!localIterator.hasNext()) {
                                    return;
                                  }
                                  localue = (ue)localIterator.next();
                                  if (bool2) {
                                    break label329;
                                  }
                                  if (localue.c() != 1) {
                                    break label327;
                                  }
                                  d2 = localue.b().a();
                                  d3 = paramw1.a();
                                  if (localue.d() != 16) {
                                    break;
                                  }
                                  d4 = d2 - d3;
                                } while ((!bool2) && (Math.abs(d4) >= d1));
                                d5 = d1 - Math.abs(d4);
                                paramList2.add(ve.a(d5, localue, true, d3 + d4));
                                if (bool2) {
                                  break label169;
                                }
                              } while (!bool1);
                              d4 = paramw2.a();
                              if (bool2) {
                                break label257;
                              }
                              if (localue.d() != 4) {
                                break;
                              }
                              d5 = d2 - (d3 + d4);
                            } while ((!bool2) && (Math.abs(d5) >= d1));
                            d6 = d1 - Math.abs(d5);
                            paramList2.add(ve.a(d6, localue, true, d3 + d5));
                          } while ((!bool2) && (!bool1));
                        } while (bool2);
                      } while (localue.d() != 8);
                      d5 = d2 - (d3 - d4);
                    } while ((!bool2) && (Math.abs(d5) >= d1));
                    d6 = d1 - Math.abs(d5);
                    paramList2.add(ve.a(d6, localue, true, d3 + d5));
                    if (bool2) {
                      break label348;
                    }
                  } while (!bool1);
                  d2 = localue.b().b();
                  d3 = paramw1.b();
                  if (localue.d() != 16) {
                    break;
                  }
                  d4 = d2 - d3;
                } while ((!bool2) && (Math.abs(d4) >= d1));
                d5 = d1 - Math.abs(d4);
                paramList2.add(ve.a(d5, localue, false, d3 + d4));
                if (bool2) {
                  break label428;
                }
              } while (!bool1);
              d4 = paramw2.b();
              if (bool2) {
                break label510;
              }
              if (localue.d() != 1) {
                break;
              }
              d5 = d2 - (d3 + d4);
            } while ((!bool2) && (Math.abs(d5) >= d1));
            d6 = d1 - Math.abs(d5);
            paramList2.add(ve.a(d6, localue, false, d3 + d5));
          } while (((!bool2) && (!bool1)) || (localue.d() != 2));
          d5 = d2 - (d3 - d4);
        } while ((!bool2) && (Math.abs(d5) >= d1));
        double d6 = d1 - Math.abs(d5);
        paramList2.add(ve.a(d6, localue, false, d3 + d5));
      } while (bool2);
    } while (!bool1);
    label257:
    label428:
    return;
  }
  
  private List o()
  {
    z localz = new z();
    ld localld = this.o;
    if (a(localld))
    {
      double d1 = localld.a();
      double d2 = localld.b();
      double d3 = localld.c();
      double d4 = localld.d();
      double d5 = d1 + d3 * 0.5D;
      double d6 = d2 + d4 * 0.5D;
      a.d.w localw = this.p.d().l();
      double d7 = localw.b();
      double d8 = Math.min(d6, d7);
      double d9 = Math.max(d6, d7);
      localz.add(b((byte)16, d5, d6, d8, d9));
      localz.add(b((byte)4, d1, d6, d8, d9));
      localz.add(b((byte)16, d1, d6, d8, d9));
      localz.add(b((byte)8, d1, d6, d8, d9));
      localz.add(b((byte)4, d1 + d3, d6, d8, d9));
      localz.add(b((byte)16, d1 + d3, d6, d8, d9));
      localz.add(b((byte)8, d1 + d3, d6, d8, d9));
      double d10 = localw.a();
      d8 = Math.min(d5, d10);
      d9 = Math.max(d5, d10);
      localz.add(a((byte)16, d5, d6, d8, d9));
      localz.add(a((byte)1, d5, d2, d8, d9));
      localz.add(a((byte)16, d5, d2, d8, d9));
      localz.add(a((byte)2, d5, d2, d8, d9));
      localz.add(a((byte)1, d5, d2 + d4, d8, d9));
      localz.add(a((byte)16, d5, d2 + d4, d8, d9));
      localz.add(a((byte)2, d5, d2 + d4, d8, d9));
    }
    return localz;
  }
  
  private List p()
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    z localz = new z();
    ld localld = this.o;
    o localo1 = this.p.d();
    t localt1 = this.p.c();
    double d1 = localt1.d() + localt1.b() * 0.5D;
    double d2 = localt1.e() + localt1.c() * 0.5D;
    int i = 0;
    do
    {
      if (i >= localld.x()) {
        break;
      }
      jg localjg = localld.b(i);
      o localo2 = localjg.d();
      if (!bool2)
      {
        if (!localo1.equals(localo2))
        {
          if (bool2) {
            continue;
          }
          if (a(localo2))
          {
            t localt2 = localjg.c();
            double d3 = localt2.d();
            double d4 = localt2.e();
            double d5 = localt2.b();
            double d6 = localt2.c();
            double d7 = d3 + d5 * 0.5D;
            double d8 = d4 + d6 * 0.5D;
            double d9 = Math.min(d8, d2);
            double d10 = Math.max(d8, d2);
            localz.add(b((byte)8, d3, d8, d9, d10));
            localz.add(b((byte)16, d7, d8, d9, d10));
            localz.add(b((byte)4, d3 + d5, d8, d9, d10));
            d9 = Math.min(d7, d1);
            d10 = Math.max(d7, d1);
            localz.add(a((byte)2, d7, d4, d9, d10));
            localz.add(a((byte)16, d7, d8, d9, d10));
            localz.add(a((byte)1, d7, d4 + d6, d9, d10));
          }
        }
        i++;
      }
    } while (!bool1);
    return localz;
  }
  
  private static ue a(byte paramByte, double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4)
  {
    return a(, paramByte, paramDouble1, paramDouble2, paramDouble3, paramDouble4);
  }
  
  private static ue b(byte paramByte, double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4)
  {
    return a(, paramByte, paramDouble1, paramDouble2, paramDouble3, paramDouble4);
  }
  
  private static ue a(byte paramByte1, byte paramByte2, double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4)
  {
    return new ue(paramByte1, paramByte2, new a.d.w(paramDouble1, paramDouble2), paramDouble3, paramDouble4, null, 1.0D);
  }
  
  private boolean a(o paramo)
  {
    Rectangle2D localRectangle2D = d().Q();
    return o.a(paramo, new t(localRectangle2D.getX(), localRectangle2D.getY(), localRectangle2D.getWidth(), localRectangle2D.getHeight()), 0.0D);
  }
  
  public double q()
  {
    return this.s;
  }
  
  public void b(double paramDouble)
  {
    this.s = paramDouble;
  }
  
  public double r()
  {
    return this.t;
  }
  
  public void c(double paramDouble)
  {
    this.t = paramDouble;
  }
  
  private static class a_
    extends ue
  {
    private static final double q = 10.0D;
    
    a_(byte paramByte, a.d.w paramw, double paramDouble1, double paramDouble2)
    {
      super((byte)16, paramw, paramDouble1, paramDouble2, null, 0.5D);
    }
    
    public void paint(Graphics2D paramGraphics2D)
    {
      a.d.w localw = b();
      double d1 = localw.a;
      double d2 = localw.b;
      double d3 = e();
      double d4 = f();
      Line2D.Double localDouble;
      if (c() == 1)
      {
        localDouble = new Line2D.Double(d1, d3 - 10.0D, d1, d4 + 10.0D);
        if (ld.E) {
          return;
        }
        if (!ld.D) {}
      }
      else
      {
        localDouble = new Line2D.Double(d3 - 10.0D, d2, d4 + 10.0D, d2);
      }
      paramGraphics2D.draw(localDouble);
      a(paramGraphics2D, d1, d2);
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.y

 * JD-Core Version:    0.7.0.1

 */